#ifndef HPLCPERMITPAGE_H
#define HPLCPERMITPAGE_H

#include <QWidget>
#include <QLabel>
#include <QLineEdit>
#include <QPushButton>

class HplcPermitPage : public QWidget
{
    Q_OBJECT
public:
    explicit HplcPermitPage(QWidget *parent = nullptr);

    static uint32_t generateActiveCode(uint32_t serial, uint32_t randomCode, uint16_t availableDays);
    static uint32_t randomString2UInt32(uint8_t *str);

signals:

private:
    QLabel      *m_lbSerial;
    QLineEdit   *m_leSerial;
    QLabel      *m_lbRandomCode;
    QLineEdit   *m_leRandomCode;
    QLabel      *m_lbAvailableDays;
    QLineEdit   *m_leAvailableDays;

    QLabel      *m_lbTips;
    QPushButton *m_pbActive;

    QLabel      *m_lbActiveCode;
    QLineEdit   *m_leActiveCode;
};

#endif // HPLCPERMITPAGE_H
